package collectors.calendar.models;

import java.text.SimpleDateFormat;
import java.util.Date;

public class Event {
	
	private static final SimpleDateFormat START = new SimpleDateFormat("EEE, dd 'de' MMMMM 'de' yyyy, HH:MM");
	private static final SimpleDateFormat END = new SimpleDateFormat("HH:MM");
	private String summary;
	private Date start;
	private Date end;
	private String location;
	private String htmlLink;
	
	public String getSummary() {
		return summary;
	}
	public void setSummary(String summary) {
		this.summary = summary;
	}

	public Date getStart() {
		return start;
	}
	public void setStart(Date start) {
		this.start = start;
	}
	public Date getEnd() {
		return end;
	}
	public void setEnd(Date end) {
		this.end = end;
	}
	public String getLocation() {
		return location;
	}
	public void setLocation(String location) {
		this.location = location;
	}
	public String getDateString() {
		return (start != null? START.format(start) : "")  + (end!=null? " - " + END.format(end) :"");
	}	
	public String getHtmlLink() {
		return htmlLink;
	}
	public void setHtmlLink(String htmlLink) {
		this.htmlLink = htmlLink;
	}
	
	
	@Override
	public String toString() {
		return "Event [summary=" + summary + ", start=" + start + ", end="
				+ end + ", location=" + location + ", htmlLink=" + htmlLink
				+ "]";
	}
}
